SGPrepare
TheSGPrepare
function instructs the sequence grabber to get ready to begin a preview or record operation (or to commence both operations). You specify the operations.
pascal ComponentResult SGPrepare (SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord);
s
- Specifies the component instance that identifies your connection to the sequence grabber component. You obtain this value from the Component Manager's
OpenDefaultComponent
orOpenComponent
function.prepareForPreview
- Instructs the sequence grabber component to prepare for a preview operation. Set this parameter to
true
to prepare for a preview operation. You may set both theprepareForPreview
andprepareForRecord
parameters totrue
.prepareForRecord
- Instructs the sequence grabber component to prepare for a record operation. Set this parameter to
true
to prepare for a record operation. You may set both theprepareForPreview
andprepareForRecord
parameters totrue
.DESCRIPTION
The sequence grabber component does whatever is necessary to get ready to start the preview or record operation. This may involve allocating memory, readying hardware, and notifying the sequence grabber's channels. By calling this function, you ensure that theSGStartRecord
orSGStartPreview
function starts as quickly as possible.If you do not call this function before starting a record or preview operation, the sequence grabber component makes these preparations when you start the operation. You cannot call this function after you start a preview or record operation.
If you call
SGPrepare
without subsequently starting a record or preview operation, you should call theSGRelease
function (described in the next section). This allows the sequence grabber component to release any system resources it allocated when you calledSGPrepare
.SPECIAL CONSIDERATIONS
The window in which the sequence grabber is to draw video frames (as defined by
theSGSetGWorld
function, described on page 5-27) must be visible before you call theSGPrepare
function. Otherwise, the sequence grabber does not display the frames properly. If the window isn't visible andSGPrepare
is called with theprepareForPreview
parameter set totrue
and theprepareForRecord
parameter set tofalse
, and the window is subsequently shown via the Window Manager'sShowWindow
routine, the sequence grabber won't display frames properly in the video window. The visible region of the window wasn't valid when theSGPrepare
call
was made.RESULT CODES
File Manager errors
paramErr -50 Invalid parameter specified cantDoThatInCurrentMode -9402 Request invalid in current mode notEnoughMemoryToGrab -9403 Insufficient memory for record operation notEnoughDiskSpaceToGrab -9404 Insufficient disk space for record operation deviceCantMeetRequest -9408 Device cannot support grabber
Memory Manager errors
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help